﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.Windows.Forms;
using System.Drawing;

namespace DuplexServiceClient
{
    [CallbackBehavior(ConcurrencyMode=ConcurrencyMode.Multiple)]
    public class CallbackImplementation : ServiceReference1.IServiceCallback
    {
        public void SendMessageToClient(string message)
        {
            string msg = string.Format("({0}) Someone : {1}", DateTime.Now.ToShortTimeString(), message);
            StaticDepender.listBox.Items.Add(msg);
        }

        public void UpdateContacts(string nickname)
        {
            StaticDepender.contactsBox.Items.Add(nickname);  
        }
    }
}
